package com.xpgk.mvc.bloseWeight;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;
import com.xpgk.mvc.measurement.Temporary;
import com.xpgk.mvc.user.User;

/**
 * 
 * 减重目标明细
 * 
 */

@SuppressWarnings("unused")
@Table(tableName = DelWeiTarget.table_name)
public class DelWeiTarget extends BaseModel<DelWeiTarget> {

	private static final long serialVersionUID = -2116807457170392714L;

	private static final Log log = Log.getLog(DelWeiTarget.class);

	public static final DelWeiTarget dao = new DelWeiTarget().dao();

	/**
	 * 表名称
	 */
	public static final String table_name = "sb_customer_dtarget_detail";

	/**
	 * 字段描述：主键 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";
	
	/**
	 * 字段描述：目标汇总ids：character varying 长度：32
	 */
	public static final String column_targetIds = "sc_targetIds";

	/**
	 * 字段描述：排期 字段类型：character varying 长度：100
	 */
	public static final String column_schedule = "schedule";

	/**
	 * 字段描述：起始时间 字段类型：date
	 */
	public static final String column_startTime = "startTime";

	/**
	 * 字段描述：结束时间 字段类型：date
	 */
	public static final String column_endTime = "endTime";

	/**
	 * 字段描述：计划到店次数 字段类型：int 长度：2
	 */
	public static final String column_planToStoreNum = "planToStoreNum";
	/**
	 * 字段描述：减重目标 类型：character varying 长度：255
	 */
	public static final String column_delWeiTarget = "delWeiTarget";
	/**
	 * 字段描述：目标状态 类型：character varying 长度：255
	 */
	public static final String column_dataStatus = "dataStatus";
	

	/**
	 * sqlId :sb.delWeiTarget.column 描述：查询减重目标，自定义字段
	 */
	public static final String sqlId_column = "sb.delWeiTarget.column";
	/**
	 * sqlId :sb.delWeiTarget.selDelInShop 描述：查询到店次数
	 */
	public static final String sqlId_selDelInShop = "sb.delWeiTarget.selDelInShop";
	

	/**
	 * 字段描述：该条数据添加人员is  字段类型：character varying 长度：32
	 */
	public static final String column_createId = "createId";
	/**
	 * 字段描述：该条数据添加时间  字段类型：datetime 长度：0
	 */
	public static final String column_createDate = "createDate";
	/**
	 * 字段描述：该条数据更新人员id  字段类型：character varying 长度：100
	 */
	public static final String column_updateId = "updateId";
	/**
	 * 字段描述：该条数据更新时间  字段类型：datetime 长度：0
	 */
	public static final String column_updateDate = "updateDate";
	
	
	
	
	/**
	 * 通过targetSumIds 查询所有target
	 * @param targetSumIds
	 * @return
	 */
	public List<DelWeiTarget> findTargetBySum(String targetSumIds){
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("column", column_targetIds);
		String sql = getSqlByBeetl(sqlId_column, param);
		return find(sql, targetSumIds);
	}

}
